package games.flvPlayer.ui
{
	import flash.display.Sprite;
	import flash.events.Event;
	
	import games.flvPlayer.data.ContrlShowInfo;
	
	import interfaces.IAction;

	public class ShowControl
	{
		private var m_target:Sprite;
		private var m_info:ContrlShowInfo;
		
		public function ShowControl(mc:Sprite,mcInfo:ContrlShowInfo)
		{
			m_target = mc;
			m_info = mcInfo;
			m_info.addEventListener(Event.CHANGE,onChangeInfo);
		}
		
		private function onChangeInfo(e:Event):void
		{
			m_target.visible = m_info.isShow;
			if(m_info.isShow)
			{
				m_target.x = m_info.x;
				m_target.y = m_info.y;
			}			
		}
	}
}